/********************************************************************************
* Project       : No Latency RTSP streaming Project
* Author        : Seo, SeokWon
* e-mail        : kueony@gmail.com
* Licence       : See the Copyright
*********************************************************************************/

#ifndef  ___LIB_LOG_H___
#define  ___LIB_LOG_H___

#define LIB_LOG_TYPE_MSG	0x01
#define LIB_LOG_TYPE_ERROR	0x02
#define LIB_LOG_TYPE_DATA	0x04
#define LIB_LOG_TYPE_DEBUG	0x08

#define LIB_LOG_MODE_NONE	0
#define LIB_LOG_MODE_PRINT	1
#define LIB_LOG_MODE_FILE	0

#if LIB_LOG_MODE_NONE
	#define	LogMsg(type, fmt, args...)		((void)0)
#elif LIB_LOG_MODE_PRINT
	#define	LogMsg(type, fmt, args...)		do{ \
												LibLogPrint(type, fmt, ##args); \
											} while(0)
#elif LIB_LOG_MODE_FILE
	#define	LogMsg(type, fmt, args...)		do { \
												LibLogFile(type, fmt, ##args); \
											} while(0)
#else
	#define	LogMsg(type, fmt, args...)		((void)0)
#endif

extern int	LibLogSetFileName(char *a_pcFileName);
extern void	LibLogSetType(int a_iFlag);
extern void	LibLogQuit();

#if LIB_LOG_MODE_PRINT
	extern void	LibLogPrint(int a_iType, const char *a_pcncFormat, ...);
#endif

#if LIB_LOG_MODE_FILE
	extern void	LibLogFile(int a_iType, const char *a_pcncFormat, ...);
#endif


#endif// ___LIB_LOG_H___

